.class public Lcom/htc/android/footprints/view/LocationController;
.super Landroid/widget/LinearLayout;
.source "LocationController.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/htc/android/footprints/view/LocationController$NameAndDate;,
        Lcom/htc/android/footprints/view/LocationController$ControllerListerner;
    }
.end annotation


# static fields
.field private static final FALLBACK_PROVIDER_THRESHOLD_MILLIS:J = 0x2710L

.field private static final GPS:Ljava/lang/String; = "gps"

.field private static final HANDLER_CHECK_SIGNAL:I = 0x66

.field private static final HANDLER_TRACKING:I = 0x65

.field private static final HANDLER_UPDATE_STATUS:I = 0x67

.field private static final HANDLER_WAIT_TIMEOUT:I = 0x64

.field private static final ICON_LEVEL_GPS_OFF:I = 0x6

.field private static final ICON_LEVEL_GPS_ON:I = 0x5

.field private static final ICON_LEVEL_MAP:I = 0x7

.field private static final ICON_LEVEL_NETWORK:I = 0x8

.field private static final ICON_LEVEL_SIGNAL0:I = 0x0

.field private static final ICON_LEVEL_SIGNAL1:I = 0x1

.field private static final ICON_LEVEL_SIGNAL2:I = 0x2

.field private static final ICON_LEVEL_SIGNAL3:I = 0x3

.field private static final ICON_LEVEL_SIGNAL4:I = 0x4

.field private static final LOCATION_MIS_DISTANCE:F = 0.0f

.field private static final LOCATION_UPDATE_MILLIS:J = 0x0L

.field private static final LOW_SIGNAL:I = 0x5

.field private static final MODE_FIX_GPS:I = 0xc

.field private static final MODE_FIX_MAP:I = 0xf

.field private static final MODE_FIX_NETWORK:I = 0xd

.field private static final MODE_FIX_NONE:I = 0xe

.field private static final MODE_TRACKING:I = 0xb

.field private static final NETWORK:Ljava/lang/String; = "network"

.field private static PROVIDER_NAMES:[Ljava/lang/String; = null

.field private static final TAG:Ljava/lang/String; = "LocationController"

.field private static final TIMEOUT:J = 0x2710L


# instance fields
.field private gpsFixStatus:Lcom/htc/android/footprints/utils/GpsFixStatus;

.field private gpsListener:Landroid/location/GpsStatus$Listener;

.field private isFixGps:Z

.field private isFixNetwork:Z

.field private isTrackingTimeOut:Z

.field private locationList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/location/Location;",
            ">;"
        }
    .end annotation
.end field

.field private mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

.field private mContext:Landroid/content/Context;

.field private mCurMode:I

.field private final mEnabledProviders:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/view/LocationController$NameAndDate;",
            ">;"
        }
    .end annotation
.end field

.field private mFixAccuracy:I

.field private mGpsSignal:F

.field private mHandler:Landroid/os/Handler;

.field private mLocation:Landroid/location/Location;

.field private mLocationListener:Landroid/location/LocationListener;

.field private mLocationManager:Landroid/location/LocationManager;

.field private mNetworkLocation:Landroid/location/Location;

.field private mStatusIcon:Landroid/widget/ImageView;

.field private mTimeoutTimer:Ljava/lang/Long;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 72
    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "gps"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "network"

    aput-object v2, v0, v1

    sput-object v0, Lcom/htc/android/footprints/view/LocationController;->PROVIDER_NAMES:[Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    .line 116
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 74
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    .line 76
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    .line 78
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    .line 80
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    .line 82
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    .line 84
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->gpsFixStatus:Lcom/htc/android/footprints/utils/GpsFixStatus;

    .line 88
    iput v3, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 90
    const-wide/16 v0, 0x2710

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mTimeoutTimer:Ljava/lang/Long;

    .line 92
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    .line 94
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    .line 96
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    .line 98
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 100
    new-instance v0, Ljava/util/ArrayList;

    const/4 v1, 0x2

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    .line 103
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    .line 105
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    .line 395
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$1;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$1;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationListener:Landroid/location/LocationListener;

    .line 455
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$2;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$2;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->gpsListener:Landroid/location/GpsStatus$Listener;

    .line 525
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$3;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$3;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    .line 117
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    .line 118
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->init()V

    .line 119
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 4
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    .line 122
    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 74
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    .line 76
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    .line 78
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    .line 80
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    .line 82
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    .line 84
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->gpsFixStatus:Lcom/htc/android/footprints/utils/GpsFixStatus;

    .line 88
    iput v3, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 90
    const-wide/16 v0, 0x2710

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mTimeoutTimer:Ljava/lang/Long;

    .line 92
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    .line 94
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    .line 96
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    .line 98
    iput-boolean v3, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 100
    new-instance v0, Ljava/util/ArrayList;

    const/4 v1, 0x2

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    .line 103
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    .line 105
    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    .line 395
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$1;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$1;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationListener:Landroid/location/LocationListener;

    .line 455
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$2;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$2;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->gpsListener:Landroid/location/GpsStatus$Listener;

    .line 525
    new-instance v0, Lcom/htc/android/footprints/view/LocationController$3;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/view/LocationController$3;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    iput-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    .line 123
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    .line 124
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->init()V

    .line 125
    return-void
.end method

.method static synthetic access$000(Lcom/htc/android/footprints/view/LocationController;)Ljava/util/ArrayList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/view/LocationController;)Landroid/location/Location;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$1000(Lcom/htc/android/footprints/view/LocationController;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeGpsSignal()V

    return-void
.end method

.method static synthetic access$1100(Lcom/htc/android/footprints/view/LocationController;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    return-void
.end method

.method static synthetic access$1200(Lcom/htc/android/footprints/view/LocationController;)Landroid/widget/ImageView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    return-object v0
.end method

.method static synthetic access$1302(Lcom/htc/android/footprints/view/LocationController;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput p1, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    return p1
.end method

.method static synthetic access$1400(Lcom/htc/android/footprints/view/LocationController;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    return-void
.end method

.method static synthetic access$200(Lcom/htc/android/footprints/view/LocationController;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    return v0
.end method

.method static synthetic access$202(Lcom/htc/android/footprints/view/LocationController;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-boolean p1, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    return p1
.end method

.method static synthetic access$300(Lcom/htc/android/footprints/view/LocationController;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->onGpsFix()V

    return-void
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/view/LocationController;)Lcom/htc/android/footprints/view/LocationController$ControllerListerner;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    return-object v0
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/view/LocationController;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    return v0
.end method

.method static synthetic access$502(Lcom/htc/android/footprints/view/LocationController;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-boolean p1, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    return p1
.end method

.method static synthetic access$602(Lcom/htc/android/footprints/view/LocationController;Landroid/location/Location;)Landroid/location/Location;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    return-object p1
.end method

.method static synthetic access$700(Lcom/htc/android/footprints/view/LocationController;)Landroid/location/LocationManager;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    return-object v0
.end method

.method static synthetic access$800(Lcom/htc/android/footprints/view/LocationController;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    return v0
.end method

.method static synthetic access$802(Lcom/htc/android/footprints/view/LocationController;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-boolean p1, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    return p1
.end method

.method static synthetic access$902(Lcom/htc/android/footprints/view/LocationController;F)F
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput p1, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    return p1
.end method

.method private averageLocation()V
    .locals 8

    .prologue
    .line 370
    const-wide/16 v2, 0x0

    .line 371
    .local v2, lat:D
    const-wide/16 v4, 0x0

    .line 373
    .local v4, lon:D
    iget-object v6, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/location/Location;

    .line 374
    .local v1, l:Landroid/location/Location;
    invoke-virtual {v1}, Landroid/location/Location;->getLatitude()D

    move-result-wide v6

    add-double/2addr v2, v6

    .line 375
    invoke-virtual {v1}, Landroid/location/Location;->getLongitude()D

    move-result-wide v6

    add-double/2addr v4, v6

    goto :goto_0

    .line 378
    .end local v1           #l:Landroid/location/Location;
    :cond_0
    iget-object v6, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    int-to-double v6, v6

    div-double/2addr v2, v6

    .line 379
    iget-object v6, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    invoke-virtual {v6}, Ljava/util/ArrayList;->size()I

    move-result v6

    int-to-double v6, v6

    div-double/2addr v4, v6

    .line 380
    iget-object v6, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    invoke-virtual {v6, v2, v3}, Landroid/location/Location;->setLatitude(D)V

    .line 381
    iget-object v6, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    invoke-virtual {v6, v4, v5}, Landroid/location/Location;->setLongitude(D)V

    .line 382
    return-void
.end method

.method private changeGpsSignal()V
    .locals 5

    .prologue
    const/high16 v4, 0x41f0

    const/high16 v3, 0x41a0

    const/high16 v2, 0x4120

    const/high16 v1, 0x40a0

    .line 329
    iget-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    if-eqz v0, :cond_1

    .line 342
    :cond_0
    :goto_0
    return-void

    .line 331
    :cond_1
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpg-float v0, v0, v1

    if-gez v0, :cond_2

    .line 332
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 333
    :cond_2
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpl-float v0, v0, v1

    if-ltz v0, :cond_3

    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpg-float v0, v0, v2

    if-gez v0, :cond_3

    .line 334
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 335
    :cond_3
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpl-float v0, v0, v2

    if-lez v0, :cond_4

    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpg-float v0, v0, v3

    if-gez v0, :cond_4

    .line 336
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 337
    :cond_4
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpl-float v0, v0, v3

    if-lez v0, :cond_5

    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpg-float v0, v0, v4

    if-gez v0, :cond_5

    .line 338
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 339
    :cond_5
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    cmpl-float v0, v0, v4

    if-lez v0, :cond_0

    .line 340
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0
.end method

.method private changeStatus()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 347
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 349
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    packed-switch v0, :pswitch_data_0

    .line 367
    :goto_0
    return-void

    .line 351
    :pswitch_0
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 354
    :pswitch_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x5

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 357
    :pswitch_2
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 361
    :pswitch_3
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x6

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 364
    :pswitch_4
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v1, 0x7

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageLevel(I)V

    goto :goto_0

    .line 349
    nop

    :pswitch_data_0
    .packed-switch 0xb
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
    .end packed-switch
.end method

.method private checkCurAccuracy()V
    .locals 2

    .prologue
    .line 314
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    if-nez v0, :cond_1

    .line 315
    const/16 v0, 0xe

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 326
    :cond_0
    :goto_0
    return-void

    .line 317
    :cond_1
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    .line 318
    const/16 v0, 0xc

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    goto :goto_0

    .line 320
    :cond_2
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_3

    .line 321
    const/16 v0, 0xd

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    goto :goto_0

    .line 323
    :cond_3
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    .line 324
    const/16 v0, 0xf

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    goto :goto_0
.end method

.method private forceChangeStatus()V
    .locals 1

    .prologue
    const/4 v0, 0x1

    .line 306
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    .line 307
    iput-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 308
    iput-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    .line 309
    iput-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    .line 310
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    .line 311
    return-void
.end method

.method private init()V
    .locals 3

    .prologue
    .line 128
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    const-string v2, "layout_inflater"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 131
    .local v0, inflater:Landroid/view/LayoutInflater;
    const v1, 0x7f030018

    invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    .line 133
    new-instance v1, Landroid/location/Location;

    const-string v2, "gps"

    invoke-direct {v1, v2}, Landroid/location/Location;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    .line 135
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    .line 137
    const v1, 0x7f0c007b

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/view/LocationController;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    .line 139
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mStatusIcon:Landroid/widget/ImageView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageLevel(I)V

    .line 141
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mContext:Landroid/content/Context;

    const-string v2, "location"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/location/LocationManager;

    iput-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    .line 144
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->resetStatus()V

    .line 148
    return-void
.end method

.method private onGpsFix()V
    .locals 3

    .prologue
    .line 385
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 386
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x66

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 387
    const/16 v0, 0xc

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 388
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    .line 390
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    if-eqz v0, :cond_0

    .line 391
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    const/4 v2, 0x1

    invoke-interface {v0, v1, v2}, Lcom/htc/android/footprints/view/LocationController$ControllerListerner;->onLocationFix(Landroid/location/Location;Z)V

    .line 393
    :cond_0
    return-void
.end method

.method private removeSystemListener()V
    .locals 2

    .prologue
    .line 169
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationListener:Landroid/location/LocationListener;

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->removeUpdates(Landroid/location/LocationListener;)V

    .line 171
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->gpsListener:Landroid/location/GpsStatus$Listener;

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->removeGpsStatusListener(Landroid/location/GpsStatus$Listener;)V

    .line 172
    return-void
.end method

.method private resetStatus()V
    .locals 4

    .prologue
    const/4 v2, 0x0

    .line 151
    iput-boolean v2, p0, Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z

    .line 152
    iput-boolean v2, p0, Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z

    .line 153
    iput-boolean v2, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 154
    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->reset()V

    .line 155
    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->locationList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 156
    const/4 v2, 0x0

    iput-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    .line 157
    const/4 v2, 0x0

    iput v2, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    .line 158
    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v3, 0x66

    invoke-virtual {v2, v3}, Landroid/os/Handler;->removeMessages(I)V

    .line 159
    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v3, 0x64

    invoke-virtual {v2, v3}, Landroid/os/Handler;->removeMessages(I)V

    .line 161
    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/view/LocationController$NameAndDate;

    .line 162
    .local v1, provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    const-wide/16 v2, 0x0

    iput-wide v2, v1, Lcom/htc/android/footprints/view/LocationController$NameAndDate;->date:J

    goto :goto_0

    .line 164
    .end local v1           #provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    :cond_0
    return-void
.end method

.method private setGpsFixListener()V
    .locals 2

    .prologue
    .line 598
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->gpsFixStatus:Lcom/htc/android/footprints/utils/GpsFixStatus;

    new-instance v1, Lcom/htc/android/footprints/view/LocationController$4;

    invoke-direct {v1, p0}, Lcom/htc/android/footprints/view/LocationController$4;-><init>(Lcom/htc/android/footprints/view/LocationController;)V

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/utils/GpsFixStatus;->setFixListener(Lcom/htc/android/footprints/utils/GpsFixStatus$FixListener;)V

    .line 602
    return-void
.end method


# virtual methods
.method public enableMyLocation()V
    .locals 14

    .prologue
    const-string v13, "Couldn\'t get provider "

    const-string v12, ": "

    const-string v11, "LocationController"

    .line 206
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 207
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    .line 208
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->resetStatus()V

    .line 210
    const/16 v0, 0xb

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 213
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->gpsListener:Landroid/location/GpsStatus$Listener;

    invoke-virtual {v0, v2}, Landroid/location/LocationManager;->addGpsStatusListener(Landroid/location/GpsStatus$Listener;)Z

    .line 215
    sget-object v6, Lcom/htc/android/footprints/view/LocationController;->PROVIDER_NAMES:[Ljava/lang/String;

    .local v6, arr$:[Ljava/lang/String;
    array-length v10, v6

    .local v10, len$:I
    const/4 v8, 0x0

    .local v8, i$:I
    :goto_0
    if-ge v8, v10, :cond_1

    aget-object v1, v6, v8

    .line 217
    .local v1, name:Ljava/lang/String;
    :try_start_0
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v9

    .line 219
    .local v9, isProviderEnabled:Z
    if-nez v9, :cond_0

    .line 215
    .end local v9           #isProviderEnabled:Z
    :goto_1
    add-int/lit8 v8, v8, 0x1

    goto :goto_0

    .line 223
    .restart local v9       #isProviderEnabled:Z
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;

    new-instance v2, Lcom/htc/android/footprints/view/LocationController$NameAndDate;

    invoke-direct {v2, v1}, Lcom/htc/android/footprints/view/LocationController$NameAndDate;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 224
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationManager:Landroid/location/LocationManager;

    const-wide/16 v2, 0x0

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/htc/android/footprints/view/LocationController;->mLocationListener:Landroid/location/LocationListener;

    invoke-virtual/range {v0 .. v5}, Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;)V

    .line 227
    const-string v0, "LocationController"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Request updates from "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_1

    .line 228
    .end local v9           #isProviderEnabled:Z
    :catch_0
    move-exception v0

    move-object v7, v0

    .line 229
    .local v7, e:Ljava/lang/SecurityException;
    const-string v0, "LocationController"

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Couldn\'t get provider "

    invoke-virtual {v0, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ": "

    invoke-virtual {v0, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v7}, Ljava/lang/SecurityException;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v11, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 231
    .end local v7           #e:Ljava/lang/SecurityException;
    :catch_1
    move-exception v0

    move-object v7, v0

    .line 232
    .local v7, e:Ljava/lang/IllegalArgumentException;
    const-string v0, "LocationController"

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Couldn\'t get provider "

    invoke-virtual {v0, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ": "

    invoke-virtual {v0, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v7}, Ljava/lang/IllegalArgumentException;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v11, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_1

    .line 237
    .end local v1           #name:Ljava/lang/String;
    .end local v7           #e:Ljava/lang/IllegalArgumentException;
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v2, 0x65

    const-wide/16 v3, 0x32

    invoke-virtual {v0, v2, v3, v4}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 238
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v2, 0x64

    iget-object v3, p0, Lcom/htc/android/footprints/view/LocationController;->mTimeoutTimer:Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    invoke-virtual {v0, v2, v3, v4}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 239
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v2, 0x66

    const-wide/16 v3, 0x3e8

    invoke-virtual {v0, v2, v3, v4}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 240
    return-void
.end method

.method public forceStatusToGPS()V
    .locals 1

    .prologue
    .line 288
    const/4 v0, 0x2

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 289
    const/16 v0, 0xc

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 290
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->forceChangeStatus()V

    .line 291
    return-void
.end method

.method public forceStatusToMap()V
    .locals 1

    .prologue
    .line 300
    const/4 v0, 0x3

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 301
    const/16 v0, 0xf

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 302
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->forceChangeStatus()V

    .line 303
    return-void
.end method

.method public forceStatusToNetwork()V
    .locals 1

    .prologue
    .line 294
    const/4 v0, 0x1

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 295
    const/16 v0, 0xd

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 296
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->forceChangeStatus()V

    .line 297
    return-void
.end method

.method public forceStatusToNoneFix()V
    .locals 1

    .prologue
    .line 282
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    .line 283
    const/16 v0, 0xe

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 284
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->forceChangeStatus()V

    .line 285
    return-void
.end method

.method public getAccuracy()I
    .locals 1

    .prologue
    .line 251
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mFixAccuracy:I

    return v0
.end method

.method public getFixGpsCeoPoint()Lcom/google/android/maps/GeoPoint;
    .locals 6

    .prologue
    const-wide v4, 0x412e848000000000L

    .line 263
    const/4 v0, 0x0

    .line 265
    .local v0, gp:Lcom/google/android/maps/GeoPoint;
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    if-eqz v1, :cond_0

    .line 266
    new-instance v0, Lcom/google/android/maps/GeoPoint;

    .end local v0           #gp:Lcom/google/android/maps/GeoPoint;
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    mul-double/2addr v1, v4

    double-to-int v1, v1

    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    mul-double/2addr v2, v4

    double-to-int v2, v2

    invoke-direct {v0, v1, v2}, Lcom/google/android/maps/GeoPoint;-><init>(II)V

    .line 269
    .restart local v0       #gp:Lcom/google/android/maps/GeoPoint;
    :cond_0
    return-object v0
.end method

.method public getFixGpsLocation()Landroid/location/Location;
    .locals 1

    .prologue
    .line 255
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;

    return-object v0
.end method

.method public getFixNetworkGeoPoint()Lcom/google/android/maps/GeoPoint;
    .locals 6

    .prologue
    const-wide v4, 0x412e848000000000L

    .line 273
    const/4 v0, 0x0

    .line 274
    .local v0, gp:Lcom/google/android/maps/GeoPoint;
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    if-eqz v1, :cond_0

    .line 275
    new-instance v0, Lcom/google/android/maps/GeoPoint;

    .end local v0           #gp:Lcom/google/android/maps/GeoPoint;
    iget-object v1, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    invoke-virtual {v1}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    mul-double/2addr v1, v4

    double-to-int v1, v1

    iget-object v2, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    invoke-virtual {v2}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    mul-double/2addr v2, v4

    double-to-int v2, v2

    invoke-direct {v0, v1, v2}, Lcom/google/android/maps/GeoPoint;-><init>(II)V

    .line 278
    .restart local v0       #gp:Lcom/google/android/maps/GeoPoint;
    :cond_0
    return-object v0
.end method

.method public getFixNetworkLocation()Landroid/location/Location;
    .locals 1

    .prologue
    .line 259
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;

    return-object v0
.end method

.method public isTrackingGps()Z
    .locals 2

    .prologue
    .line 175
    iget v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    const/16 v1, 0xb

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public pauseControl()V
    .locals 2

    .prologue
    .line 180
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    .line 181
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 182
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x66

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 183
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 184
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    .line 185
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    .line 186
    return-void
.end method

.method public pauseControlByAccuracy()V
    .locals 2

    .prologue
    .line 189
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mGpsSignal:F

    .line 190
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/htc/android/footprints/view/LocationController;->isTrackingTimeOut:Z

    .line 191
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x66

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 192
    iget-object v0, p0, Lcom/htc/android/footprints/view/LocationController;->mHandler:Landroid/os/Handler;

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 193
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->checkCurAccuracy()V

    .line 194
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    .line 195
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    .line 196
    return-void
.end method

.method public setControllerListener(Lcom/htc/android/footprints/view/LocationController$ControllerListerner;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 247
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    .line 248
    return-void
.end method

.method public setTimeoutTimer(Ljava/lang/Long;)V
    .locals 0
    .parameter "timer"

    .prologue
    .line 243
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController;->mTimeoutTimer:Ljava/lang/Long;

    .line 244
    return-void
.end method

.method public shutdownControl()V
    .locals 1

    .prologue
    .line 199
    const/16 v0, 0xe

    iput v0, p0, Lcom/htc/android/footprints/view/LocationController;->mCurMode:I

    .line 200
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->resetStatus()V

    .line 201
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->removeSystemListener()V

    .line 202
    invoke-direct {p0}, Lcom/htc/android/footprints/view/LocationController;->changeStatus()V

    .line 203
    return-void
.end method
